﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace SyncCommon
{
    public delegate void UpdateStatusHandler(ISyncHouse sender, StatusData statuData);
    public delegate string ValidationCodeHandler(Image t);
    public interface ISyncHouse
    {
        long WebSiteID { get; set; }

        int RowID { get; set; }

        event UpdateStatusHandler UpdateStatus;
        event ValidationCodeHandler ValidationCode;
        /// <summary>
        /// 检查登陆
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        bool CheckLogin();

        /// <summary>
        /// 添加房源
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool AddHouse(HouseInfo info, ref string targetID);

        /// <summary>
        /// 删除房源
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool DeleteHouse(HouseInfo info,string target);

        /// <summary>
        /// 刷新
        /// </summary>
        /// <param name="HefaCode"></param>
        bool RefreshHouse(HouseInfo info, string target);

        bool OpenEidt(WebBrowserOp op, HouseInfo info);

    }
}
